﻿using AiShow.BLL;
using AiShow.IBLL;
using AiShow.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AiShow.WebSite
{

    /// <summary>
    /// 聊天页
    /// </summary>
    public partial class Chat : Page
    {
        //protected int selfId;
        //protected int otherId;
        //protected Friend friend;
        protected TBUsers user;
        protected TBUsers friend;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {   //获取当前登录用户信息
                this.user = IdentityManager.ReadUser();
                //this.selfId = user.Id;
               

                //this.otherId = int.Parse(Request.QueryString["to"]);
                //IFriendManager friendManager = new FriendManager();
                //this.friend = friendManager.GetFriend(selfId, otherId);
                //根据Id获取好友信息
                IUserManager manager = new UserManager();
                //manager.GetUser(）是操作结果类要加.Result
                friend = manager.GetUser(Convert.ToInt32(Request.QueryString["to"])).Result;
            }
        }
    }
}